package com.week2.day04.heroSort;

import com.week2.day04.teamFight.Hero;

import java.util.Comparator;
import java.util.Random;

public class HeroComparactor implements Comparator<Hero> {
    private int hp;
    private int damage;

    public HeroComparactor() {
        Random random = new Random();
        hp = random.nextInt(40) + 80;
        damage = random.nextInt(10) + 20;
    }

    @Override
    public int compare(Hero o1, Hero o2) {
        return o1.getDamage() - o2.getDamage();
    }
}
